<template>
  <div>{{ params ? '监听到事件：' + params : '未接收到事件' }}</div>
</template>

<script setup lang="ts">
import { bus } from '@/utils/eventBus'

const params = ref('')

// bus.once('msg', data => (params.value = data))
bus.on('msg', data => (params.value = data))
</script>

<style scoped lang="scss"></style>
